<?php
/**
 *   系统错误日志
*/

namespace app\admin\controller;

use app\facade\Basic;
use think\Request;
use app\admin\service\SystemErrorLog as ServiceSystemErrorLog;

class SystemErrorLog extends BaseController
{

    /**
     *  账号密码登录
     *  手机/邮箱登录
    */
    public function index(Request $request)
    {
        $param['type'] = $request->param('type','00');
        $param['pageIndex'] = $request->param('pageIndex',1);
        $param['pageSize'] = $request->param('pageSize',30);


        /* 验证 */
//        $this->validateData($param,'Login.account');

        $ServiceLogin = new ServiceSystemErrorLog();
        $result = $ServiceLogin->list($param,$param['pageIndex'],$param['pageSize']);

        return Basic::json($result);
    }


    /**
     *  删除系统日志
    */
    public function delete(Request $request)
    {

        $param['operator_id'] = $request->operator_id;
        $param['ids'] = $request->param('ids',null);
        $ModelSystemErrorLog = new ServiceSystemErrorLog();
        $result = $ModelSystemErrorLog->delete($param);

        return Basic::json($result);

    }
}
